package com.nanhai.buddhist.college.module.collegebase.dal.dataobject.classes;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nanhai.buddhist.college.framework.mybatis.core.dataobject.BaseDO;
import com.nanhai.buddhist.college.module.collegebase.api.collegeclass.dto.ClassesTeacherDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;
import java.util.List;

/**
 * 学校管理-班级 DO
 *
 * @author 开发
 */
@TableName("t_school_classes")
@KeySequence("t_school_classes_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ClassesDO extends BaseDO {

    /**
     * 班级id
     */
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;
    /**
     * 班级编号
     */
    private String classesNumber;
    /**
     * 班级名称
     */
    private String classesName;
    /**
     * 班级代码
     */
    private String classesCode;
    /**
     * 专业id
     * <p>
     * 枚举
     */
    private String professionId;
    /**
     * 所属年级
     */
    private String classesGrade;
    /**
     * 开班时间
     */
    private Date openingTime;
    /**
     * 机构编号
     */
    private Integer orgId;
    /**
     * 备注
     */
    private String remark;

    /**
     * 计数器用于代码生成
     */
    private Integer classesCounter;

    /**
     * 班级介绍
     */
    private String classesIntroduce;

    private String classTeacherName;

    private String classInstructorName;

    private String studentsCount;

    private Integer teacherUserType;
    //-----------------------------------分割线----------------------------

    /**
     * 学生数量
     */
    @TableField(exist = false)
    private Long studentCount;


    /**
     * 学院名称
     */
    @TableField(exist = false)
    private String collegeName;

    /**
     * 系部名称
     */
    @TableField(exist = false)
    private String departmentsName;


    /**
     * 专业名称
     */
    @TableField(exist = false)
    private String professionsName;


    /**
     * 专业层次 {@see ProfessionsDO::hierarchy}
     */
    @TableField(exist = false)
    private String hierarchy;


    /**
     * 班级教师集合
     */
    @TableField(exist = false)
    private List<ClassesTeacherDTO> classesTeacherDTOS;

    @TableField(exist = false)
    private String collegeId;

    @TableField(exist = false)
    private String departmentsId;

}
